package com.jueban.Vo;

import com.jueban.model.Suggest;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

import java.util.Date;

@Getter
@Setter
class SuggestVo {

    private Integer id;

    private Date createDate;

    private String suggest;

    private String writer;

    SuggestVo(Suggest suggest) {
        if (suggest != null) {
            BeanUtils.copyProperties(suggest, this, "writer");
            writer = suggest.getWriter().getName();
        }
    }
}
